<?php
	include("global.php");
	$categorys_temp = $db->findall('category');
	while ($row = $db->fetch_array($categorys_temp)) {
		$categorys[$row['id']] = $row['typename'];
	}
	if(isset($_POST['submit']))
	{	
		$gongsiname = $_POST['gongsiname'];
		$gongsinum = $_POST['gongsinum'];
		$password = $_POST['password'];
		$email = $_POST['email'];
		$address = $_POST['address'];
		$tel = $_POST['tel'];
		$name = 'gongsiname,gongsinum,password,email,address,tel';
			$values = $gongsiname."','" .$gongsinum."','" .$password."','" .$email."','" .$address."','" .$tel;
		$db->insert('user',$name,$values);
		$db->Get_admin_msg("login.php");
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link href="css/div.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js" language="javascript" type="text/javascript"></script>
<script src="js/jquery-1.4.2.js" language="javascript" type="text/javascript"></script>
<script src="js/secondmenu.js" language="javascript" type="text/javascript"></script>
<style type="text/css">
.pages { height:25px; overflow:hidden; text-align:center; line-height:25px; font-family:Verdana; }
.pages a, .pages strong { margin:0 1px; padding:2px 6px; border:1px solid #E4E4E4; text-decoration:none!important; }
.pages a:hover { border-color:#369; color:369 }
.backs { border-color:#369; background:#369; color:#FFF; }
.pages .prev { padding:4px 6px 2px 20px!important; padding:4px 6px 0 20px; background:url(images/arrow_left.gif) no-repeat 9% 50%; font-family:simsun; }
.next { padding:4px 20px 2px 6px!important; padding:4px 20px 0 6px; background:url(images/arrow_right.gif) no-repeat 91% 50%; font-family:simsun; }
</style>
<script type="text/javascript">
	$(function(){
		$("#fenye a").click( function() {
			$(this).addClass("backs");
		});
	});	 
</script>


</head>
<?php
	include("conn/conn.php");
?>
<body>
<div class="box1">
	<?php include("top.php"); ?>
		<embed src="diy/pics/20100623/1.swf" width="1002" height="254" style="position: absolute; left: 18%; top: 130px;"  quality="high" wmode="transparent"  />
			<img src="diy/pics/20100623/renliziyuan1.png" border="0" width="1002" />
		  </div>
		</div>
		<div style=" height:10px;">&nbsp;</div>
		
	<div style=" height:20px;">&nbsp;</div>
	<div style=" width:1003px;">
		<div style=" width:200px; overflow:hidden; float:left;">
			
			<?php
				include("news_detailtree.php");
				include("search.php");
			?>
		</div>
		<div style="float:left; width:50px;">&nbsp;</div>
		<div style=" float:left; width:750px;">
			<div style=" width: 750px; background-color:#8DBAE0; height:5px;"></div>
			<div style=" width:200px; height:15px;">&nbsp;</div>
			<div style=" width:750px; height:20px;">
				<span style=" float:left; text-align:left;color:#768DC1; font-size:15px; font-weight:bolder; height:30px;">
					会员注册
				</span><span style=" float:right;text-align:right" id="span1"><a href="index.php">首页</a>-><a href="register.php">会员注册</a></span>
			</div>
			<div style=" height:10px;">&nbsp;</div>
			<div style=" width:750px; text-align:left;">
			<script src="base/js/jquery.validate.min.js"></script>
            <script>
                $(function() {
                    // validate signup form on keyup and submit
                    $("#form1").validate({
                        rules: {
                            gongsiname: "required",
                            gongsinum: "required",
                            tel: "required",
                            password: {
                                required: true,
                                minlength: 6
                            },
                            compassword: {
                                required: true,
                                minlength: 6,
                                equalTo: "#password"
                            },
                            email: {
                                required: true,
                                email: true
                            }
                        },
                        messages: {
                            gongsiname: "公司名不能为空",
                            gongsinum: "公司注册号不能为空",
                            tel: "公司电话不能为空",
                            password: {
                                required: "密码不能为空",
                                minlength: "密码不能小于6位"
                            },
                            compassword: {
                                required: "密码确认不能为空",
                                minlength: "密码不能小于6位",
                                equalTo: "两次输入不一致"
                            },
                            email:{
                                required: "邮箱不能为空",
                                email: "邮箱格式不正确"
                            }
                        }
                    });
                })
            </script>
                <form action="register.php" method="post" id="form1">
                    <p>公司名称：&nbsp;&nbsp;&nbsp;&nbsp;<input name="gongsiname" id="gongsiname" type="text" value="" style="width:200px; height:20px; border-bottom:1px solid #aaa" class="inputproduct">    </p>
					<br />
		<p>公司注册号：&nbsp;<input name="gongsinum"  id="gongsinum" type="text"  value="" style="width:200px; height:20px; border-bottom:1px solid #aaa" class="inputproduct">  </p>					<br />
		<p>密码：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="password"  id="password" type="password" value="" style="width:200px; height:20px; border-bottom:1px solid #aaa" class="inputproduct">    </p>					<br />
		<p> 密码确认：&nbsp;&nbsp;&nbsp;&nbsp;<input name="compassword" id="compassword" type="password" value="" style="width:200px; height:20px; border-bottom:1px solid #aaa" class="inputproduct"> </p>   					<br />
		<p>邮箱地址：&nbsp;&nbsp;&nbsp;&nbsp;<input name="email" id="email" type="text" value="" style="width:200px; height:20px; border-bottom:1px solid #aaa" class="inputproduct">    </p>					<br />
		<p> 公司地址：&nbsp;&nbsp;&nbsp;&nbsp;<input name="address" id="address"  type="text" value="" style="width:200px; height:20px; border-bottom:1px solid #aaa" class="inputproduct">  </p>  					<br />
		<p> 联系电话：&nbsp;&nbsp;&nbsp;&nbsp;<input name="tel" id="tel" type="text" value="" style="width:200px; height:20px; border-bottom:1px solid #aaa" class="inputproduct">    </p>					<br /><br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="submit1" type="submit" value="注册" name="submit" style="width:60px; height:25px;"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input class="reset" type="reset" value="重置" name="reset" style="width:60px; height:25px;"/>
	                </form>
					<br /><br />
			</div>
		</div>
	</div>
	<br /><br />
	<?php
		include("foot.php");
	?>
</div>
</body>
</html>

